﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VideoProbeList.aspx.cs" Inherits="SysManage.Module.VideoProbe.VideoProbeList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server"></f:PageManager>
        <f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
            <Regions>
                <f:Region ID="Region1" ShowBorder="false" ShowHeader="true" BodyPadding="5px" Width="280px"
                    Position="Left" Layout="Fit" runat="server">
                    <Items>
                        <f:Tree ID="TreeBranch" AutoLeafIdentification="true" Width="650px" EnableCollapse="true"
                            ShowHeader="false" Title="组织" OnNodeCommand="TreeBranch_NodeCommand" runat="server">
                        </f:Tree>
                    </Items>
                </f:Region>
                <f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BodyPadding="5px 5px 5px 0" runat="server">
                    <Items>

                        <f:Form ID="Form3" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false" ShowBorder="false" LabelAlign="Right">
                            <Rows>
                                <f:FormRow ID="FormRow2" runat="server">
                                    <Items>
                                        <f:TextBox ID="txtSearchName" runat="server" Label="摄像头名称" EmptyText="在摄像头名称中搜索" LabelWidth="120px" LabelAlign="right"></f:TextBox>
                                        <f:Button Margin="0 0 0 5" ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" Icon="SystemSearch"></f:Button>
                                    </Items>
                                </f:FormRow>
                            </Rows>
                        </f:Form>
                        <f:Grid ID="Grid2" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="true"
                            DataKeyNames="ID,CameraName" AllowSorting="true" OnSort="Grid2_Sort" SortField="CameraName" SortDirection="DESC" AllowPaging="true" IsDatabasePaging="true" OnRowCommand="Grid2_RowCommand" OnPageIndexChange="Grid2_PageIndexChange">
                            <Toolbars>
                                <f:Toolbar ID="Toolbar1" runat="server">
                                    <Items>
                                        <f:Button ID="btnDeleteSelected" Icon="Delete" runat="server" Text="从删除除选中的数据" OnClick="btnDeleteSelected_Click">
                                        </f:Button>
                                        <f:ToolbarFill ID="ToolbarFill1" runat="server">
                                        </f:ToolbarFill>
                                        <f:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="新增摄像头"></f:Button>
                                        <f:Button ID="btnDownTmeplate" runat="server" Icon="ArrowDown" Text="下载模板" OnClientClick="DownTmeplate()"></f:Button>
                                        <f:Button ID="btnExport" runat="server" Icon="TableRowInsert" EnablePostBack="false" Text="导入" OnClientClick="btnexportclick();">
                                        </f:Button>
                                        <f:FileUpload ID="fuFile" runat="server" Hidden="true" AutoPostBack="true" OnFileSelected="fuFile_FileSelected"></f:FileUpload>
                                    </Items>
                                </f:Toolbar>
                            </Toolbars>
                            <PageItems>
                                <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                                </f:ToolbarSeparator>
                                <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                                </f:ToolbarText>
                                <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" runat="server">
                                    <f:ListItem Text="10" Value="10"></f:ListItem>
                                    <f:ListItem Text="20" Value="20"></f:ListItem>
                                    <f:ListItem Text="50" Value="50"></f:ListItem>
                                    <f:ListItem Text="100" Value="100"></f:ListItem>
                                </f:DropDownList>
                            </PageItems>
                            <Columns>
                                <f:RowNumberField></f:RowNumberField>
                                <f:BoundField DataField="CameraName" ExpandUnusedSpace="true" HeaderText="名称"></f:BoundField>
                                <%--<f:BoundField DataField="AddressTelecom" Width="300px" HeaderText="地址"></f:BoundField>
                                <f:BoundField DataField="PortTelecom" Width="100px" HeaderText="端口"></f:BoundField>--%>
                                
                                <f:BoundField DataField="LinkMan" Width="180px" HeaderText="故障联系人"></f:BoundField>
                                <f:BoundField DataField="LinkPhone" Width="180px" HeaderText="故障联系电话"></f:BoundField>
                                <f:BoundField DataField="CameraLoginName" Width="100px" HeaderText="账号"></f:BoundField>
                                <f:WindowField ColumnID="editField" TextAlign="Center" Icon="Pencil" HeaderText="编辑" ToolTip="编辑" WindowID="Window1"
                                    Title="编辑" DataIFrameUrlFields="ID"
                                    DataIFrameUrlFormatString="~/app/SysManage/Module/VideoProbe/VideoProbeEdit.aspx?id={0}"
                                    Width="50px" />
                                <f:LinkButtonField ColumnID="deleteField" TextAlign="Center" Icon="Delete"
                                    ToolTip="删除" ConfirmText="确定删除此数据？" ConfirmTarget="Top" HeaderText="删除" CommandName="Delete" Width="50px">
                                </f:LinkButtonField>
                            </Columns>
                        </f:Grid>
                    </Items>
                </f:Region>
            </Regions>
        </f:RegionPanel>
        <f:Window ID="Window1" CloseAction="Hide" runat="server" IsModal="true"
            Hidden="true" Target="Top" EnableResize="true" EnableMaximize="true" EnableIFrame="true"
            IFrameUrl="about:blank" Width="700px" Height="400px" OnClose="Window1_Close">
        </f:Window>
        <f:HiddenField ID="hdParentBranchID" runat="server">
        </f:HiddenField>
    </form>
</body>
</html>
<script src=".././../../../Scripts/jquery.min.js"></script>
<script type="text/javascript">
    function DownTmeplate() {
        window.open("../../../../DownTmeplate/摄像头导入模板.xls");
        return false;
    };

    function btnexportclick() {
        $("#RegionPanel1_Region2_Grid2_Toolbar1_fuFile-button-fileInputEl").click();
    };
</script>
